/*
 * Created on Apr 18, 2004
 *
 * Vectrics Inc.  GNU Public License.
 */
package org.vectrics.company;

import java.util.List;
import org.vectrics.common.pagelist.PageList;
import org.vectrics.company.CompanyPersonCriteria;
import org.vectrics.provider.CoreServiceLocator;
import org.vectrics.user.Person;

/**
 * @author mmoore
 */
public class CompanyPersonPageList extends PageList {
    private CompanyPersonCriteria criteria = null;
    
	/**
	 * 
	 */
	public CompanyPersonPageList(CompanyPersonCriteria criteria) {
		super();
		this.criteria = criteria;
		
	}

	public CompanyPersonPageList(Person person) {
		super();
	}

	public int getTotalElementCount() {
		int count = 0;
		count = CoreServiceLocator.getCompanyService().findCompanyPersonCount(criteria);
		return(count);
	}

	
	public List getElements(int startIndex, int endIndex) {
		List companyPersonList = null;
		companyPersonList = CoreServiceLocator.getCompanyService().findCompanyPersons(criteria, 
					startIndex, endIndex);
		return(companyPersonList);
	}

	
	
}
